﻿<%@ Page Language="C#" AutoEventWireup="true" validateRequest="false"  CodeFile="Query.aspx.cs" Inherits="Query" %>
<%@ Register Src="head.ascx" TagName="Head" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>消息用户列表</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
   
</head>
<body>
    <form id="form2" runat="server">
    <div><table width="100%" border="0">
  <tr>
    <td>&nbsp;<uc1:Head ID="Head2" runat="server" />
    </td>
  </tr>
  <tr>
    <td style="height: 485px" align="center" valign="top">
        <br />
        <br />
        URL验证规则列表<br />
        <br />
        URL: <%=urls %>
        <br />
        <br />
        <br />
        <asp:GridView ID="gdvList" runat="server" AutoGenerateColumns="False" OnRowDeleting="gdvList_RowDeleting" OnRowEditing="gdvList_RowEditing"  AllowPaging="True" OnPageIndexChanging="gdvList_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="QueryID" HeaderText="ID" />
                <asp:TemplateField HeaderText="类型">
                    <ItemTemplate>
                        <%# DGFormatSex1(Convert.ToString(DataBinder.Eval(Container.DataItem,"Type"))) %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="比较类型">
                    <ItemTemplate>
                        <%# DGFormatSex2(Convert.ToString(DataBinder.Eval(Container.DataItem,"CompareType"))) %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="LeftValue" HeaderText="左值" />
                <asp:BoundField DataField="Right" HeaderText="右值" />
                <asp:CommandField HeaderText="编辑" ShowEditButton="True" />
                <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
            </Columns>
        </asp:GridView> 
        <br />
        <table border="1"  cellpadding="0" cellspacing="0" style="width: 400px">
  <tr>
    <td colspan="2" style="height: 16px">用户添加</td>
  </tr>
  <tr>
    <td align="LEFT" style="height: 17px; width: 62px;">
        类型：</td>
    <td align="left">
        <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
            <asp:ListItem>请选择</asp:ListItem>
            <asp:ListItem Value="0">下载时间</asp:ListItem>
            <asp:ListItem Value="1">文件大小</asp:ListItem>
            <asp:ListItem Value="2">字符比较</asp:ListItem>
            <asp:ListItem Value="3">数字比较</asp:ListItem>
            <asp:ListItem Value="4">字符串重复比较</asp:ListItem>
        </asp:DropDownList></td>
  </tr>
            <tr>
                <td align="left" style="height: 17px; width: 62px;">
                    比较：</td>
                <td align="left" >
                    <asp:TextBox ID="txtLeft" runat="server" Width="175px"></asp:TextBox>
                    <asp:DropDownList ID="ddlComparType" runat="server">
                        <asp:ListItem Value="3">&gt;</asp:ListItem>
                        <asp:ListItem Value="5">&gt;=</asp:ListItem>
                        <asp:ListItem Value="0">==</asp:ListItem>
                        <asp:ListItem Value="4">&lt;=</asp:ListItem>
                        <asp:ListItem Value="2">&lt;</asp:ListItem>
                        <asp:ListItem Value="1">!=</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtRegith" runat="server" Width="44px"></asp:TextBox>
                    <asp:Label ID="lblUnit" runat="server"></asp:Label></td>
            </tr>
  <tr>
    <td style="width: 62px; height: 26px;">&nbsp;</td>
    <td align="left" style="width: 321px; height: 26px;">&nbsp;
        <% if (AddAndUpdateSign == 0) %>
        <%{ %>
        <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" />
        <%}
          else
          {%>
        <asp:Button ID="Button2" runat="server" Text="修改" OnClick="Button2_Click" /></td>
        <%} %>
  </tr>
</table>
        <br />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
            ShowSummary="False" />
        &nbsp;&nbsp;
        <asp:HiddenField ID="HidQueryId" runat="server" />
    </td>
  </tr>

</table>
    
    </div>
    </form>
</body>
</html>
